import React from "react";
import { BrowserRouter, Redirect, Switch } from "react-router-dom";

import RouterView from "./router";
import { routes } from "./router";

import "./App.css";

function App() {
    return (
        <div className="app">
            <BrowserRouter>
                <Switch>
                    <Redirect exact path="/" to="/admin/dashbaord" />
                    <RouterView routes={routes} />
                </Switch>
            </BrowserRouter>
        </div>
    );
}

export default App;
